package com.config;

import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * mybatis-plus自动填充字段
 *
 */
@Component
public class MybatisPlusAutoFilled  {
//public class MybatisPlusAutoFilled implements MetaObjectHandler {

//    @Override
//    public void insertFill(MetaObject metaObject) {
//        LocalDateTime now = LocalDateTime.now();
//        this.strictInsertFill(metaObject, "createdTime", LocalDateTime.class, now);
//        this.strictInsertFill(metaObject, "lastModifiedTime", LocalDateTime.class, now);
//    }
//
//    @Override
//    public void updateFill(MetaObject metaObject) {
//        LocalDateTime now = LocalDateTime.now();
//        this.strictUpdateFill(metaObject, "lastModifiedTime", LocalDateTime.class, now);
//    }
}
